import React from 'react';
import { Input } from 'antd';

const { Search } = Input;

interface SearchBarProps {
  searchValue: string;
  onChange: (value: string) => void;
}

export const SearchBar: React.FC<SearchBarProps> = ({ searchValue, onChange }) => {
  return (
    <div style={{
      padding: '8px',
      background: '#e8e8e8',
      borderBottom: '1px solid #d0d0d0'
    }}>
      <Search
        placeholder="搜索..."
        value={searchValue}
        onChange={(e) => onChange(e.target.value)}
        style={{ width: '100%' }}
        size="small"
      />
    </div>
  );
};
